import request from '../../utils/request';

// 用户优惠券管理相关 API

// 检查优惠券是否可用
export const checkCouponAvailable = (params: any) => {
    return request({
        url: '/member/api/coupon-user/check',
        method: 'get',
        params
    });
};

// 用户领取优惠券
export const claimCoupon = (data: any) => {
    return request({
        url: '/member/api/coupon-user/claim',
        method: 'post',
        data
    });
};

// 使用优惠券
export const useCoupon = (data: any) => {
    return request({
        url: '/member/api/coupon-user/use',
        method: 'post',
        data
    });
};
